/**
 * 显示模型状态工具类.
 */
define({
    DEFAULT:1,
    NEW : 4,
    MODIFY : 8,
    DELETE : 2,
    SELECTED : 16,
    CHILD_MODIFY : 64,
    isDefault:function(curState){
        return (curState & this.DEFAULT) == this.DEFAULT;
    },
    isNew:function(curState){
        return (curState & this.NEW) == this.NEW;
    },
    isModify:function(curState){
        return (curState & this.MODIFY) == this.MODIFY;
    },
    isDelete:function(curState){
        return (curState & this.DELETE) == this.DELETE;
    },
    isSelected:function(curState){
        return (curState & this.SELECTED) == this.SELECTED;
    },
    isChildModify:function(curState){
        return (curState & this.CHILD_MODIFY) == this.CHILD_MODIFY;
    },
    isChange:function(curState){
        return this.isNew(curState) || this.isModify(curState) || this.isDelete(curState);
    },
    isTrue:function(curState,constState){
        return (curState & constState) == constState;
    }
});